<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>设置 - Silicon Flow AI Assistant</title>
  <link rel="stylesheet" href="popup.css">
  <style>
    body {
      width: 400px;
      padding: 20px;
    }
    
    .form-group {
      margin-bottom: 20px;
    }
    
    label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
      color: #374151;
    }
    
    input[type="password"] {
      width: 100%;
      padding: 10px;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      box-sizing: border-box;
    }
    
    .btn-save {
      background-color: #10b981;
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }
    
    .btn-save:hover {
      background-color: #059669;
    }
    
    .message {
      margin-top: 10px;
      padding: 10px;
      border-radius: 4px;
      display: none;
    }
    
    .message.success {
      background-color: #d1fae5;
      color: #065f46;
      display: block;
    }
    
    .message.error {
      background-color: #fee2e2;
      color: #991b1b;
      display: block;
    }
    
    .instructions {
      background-color: #eff6ff;
      border-left: 4px solid #3b82f6;
      padding: 15px;
      margin-bottom: 20px;
      border-radius: 0 4px 4px 0;
    }
    
    .instructions h3 {
      margin-top: 0;
    }
    
    .instructions ol {
      margin-bottom: 0;
    }
  </style>
</head>
<body>
  <h1>Silicon Flow AI Assistant 设置</h1>
  
  <div class="instructions">
    <h3>如何获取API密钥</h3>
    <ol>
      <li>访问 <a href="https://www.siliconflow.cn/" target="_blank">硅基流动官网</a></li>
      <li>注册并登录账户</li>
      <li>进入个人中心或API密钥管理页面</li>
      <li>创建新的API密钥</li>
      <li>将API密钥粘贴到下方输入框中</li>
    </ol>
  </div>
  
  <div class="form-group">
    <label for="apiKey">硅基流动API密钥:</label>
    <input type="password" id="apiKey" placeholder="请输入您的API密钥">
  </div>
  
  <button id="saveBtn" class="btn-save">保存设置</button>
  
  <div id="message" class="message"></div>
  
  <script src="options.js"></script>
</body>
</html>